<?php
/**
 * xysc users Version1.0
 * ==================================
 * Copy 2016-2017
 * Web:www.xjh7.com
 * ==================================
 * Author:xjh
 * Date:2016-2-23
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>轩辕商城</title>
<link rel="stylesheet" type="text/css" href="<?php echo CSS_URL;?>list.css" />
<script type="text/javascript" src="<?php echo JS_URL;?>jquery.js"></script>
<script type="text/javascript" src="<?php echo JS_URL;?>list.js"></script>
</head>
<body>
	<form action="./index.php?r=goods/Category" method="post">
	<div id="content">
		<div id="head">
				<div id="h_info">
					<div id="left"><a href="./index.php?r=index/index"><img src="<?php echo IMG_URL;?>header.png" alt="轩辕" title="轩辕商城" /></a></div>
					<div id="search">
					<dl>
						<dt>
						    <dd>
								<input type="text" name="search" placeholder="请输入关键字进行搜索" class="search" />
								<input type="submit" name="send" value="搜索" class="submit" />
							</dd>
						</dt>
					</dl>
					</div>
				</div>
		</div>
			<div class="sp"></div>
<!--			<span><a href="#">首页</a>><a href="#">电子产品</a>><a href="#">电脑</a>> <input type="text" placeholder="在当前条件下搜索" id="search" /></span>-->
			<div class="sp"></div>
			<div id="category">
				<div class="left">分类</div>
				<div class="right">
				<?php foreach ($category_info as $_v){?>
					<a href="#" class="category" id="<?php echo $_v['category_id'];?>"><?php echo $_v['category_name'];?></a>
				<?php }?>
				</div>
			</div>
			<div id="info">
				<div class="left">品牌</div>
				<div class="right" id="brand">
				</div>
			</div>
			<!-- <div id="if">
				<div class="tag1"><a href="#">新品</a></div>
				<div class="tag2"><a href="#">销量</a></div>
				<div class="tag3"><a href="#">人气</a></div>
				<div class="tag4"><a href="#">价格</a></div>
			</div>-->
			<div id="item">
				<?php // if($this->beginCache('baby')){ ?>
				<?php if(!empty($infos)){?>
				<?php foreach ($infos as $_v){?>
				<div class="baby">
					<div class="i"><a href="./index.php?r=goods/details&_goods_id=<?php echo $_v['goods_id'];?>"><img width="210" height="204" src="<?php echo $_v['goods_thumbnail_url'];?>" title="<?php echo $_v['goods_name'];?>"></img></a></div>
					<p class="price">￥<?php echo $_v['goods_price'];?></p>
					<p class="info"><a href="./index.php?r=goods/details&_goods_id=<?php echo $_v['goods_id'];?>"><?php  echo str_replace($keyword,"<span style='color:red'>$keyword</span>",$_v['goods_name']);?></a></p>
					<?php 
						$cmodel = new CCCModel();
						$storename = $cmodel -> sel("SELECT b.store_name FROM {{goods_store}} a,{{store}} b WHERE a.store_id = b.store_id AND a.goods_id=$_v[goods_id]");
						?>
					<p class="store"><a href="#"><?php echo $storename[0]['store_name'];?></a></p>
					<p class="info2">
						<div class="i1"><span>月成交<em style="color:#b57c5b;font-style:normal;font-weight:bold"> 2481笔</em></span></div>
						<div class="i2"><span>评价<em style="color:#3388bb;font-style:normal;font-weight:bold"> 2.1万</em></span></div>
						<div class="i3"><a href="#"><img src="<?php echo IMG_URL;?>ww.png" /></a></div>
					</p>
				</div>
				<?php }?>
				<?php }else{
					echo "对不起，没有找到符合条件的商品";
				}?>
				<?php //$this->endCache();} ?>
			</div>
	</div>
	</form>
</body>
</html>